#!/bin/csh -f
set tiling=
set xyzrel=
set synops="Synopsis: rel2para -rel XYZREL TILING"
set spath=$DECAHOME/scripts
while ("$1" != "")
    switch ($1)
	case -h:
	    echo "$synops"
	    exit
	breaksw
	case -rel:
	    shift
	    set xyzrel=$1
	breaksw
	default:
	    if(-f $1) then
		set tiling=$1
	    else
		echo "rel2para: invalid option/nonexistent tiling name"
		echo "$synops"
		exit
	    endif
	breaksw
    endsw
    shift
end
if($tiling == "" || $xyzrel == "") then
    echo "$synops"
    exit
endif
$spath/fig $tiling
$spath/xyz2copa xyz.fig $tiling
$spath/xyz2para copa.upd $xyzrel
$spath/para2para copa.apa
##
